import java.util.Scanner;

public class Test9 {
    //输入三个int型的数据，放入到a,b,c三个变量中去，使用条件结构与交换逻辑将这三个变量中的值从小到大排列。
    public static void main(String[] args) {
        Scanner in = new Scanner(System.in);
        System.out.println("请输入三个整数：");
        int a = in.nextInt();
        int b = in.nextInt();
        int c = in.nextInt();

        int temp = 0; //借中间临时变量

        if (a > b) {
            temp = a;
            a = b;
            b = temp;
        }
        if (a > c) {
            temp = a;
            a = c;
            c = temp;
        }
        if (b > c) {
            temp = b;
            b = c;
            c = temp;
        }
        System.out.printf("从小到大的顺序是："+"a = %d,b = %d,c = %d", a, b, c);
    }
}
